package csel.controller.commands;

import csel.controller.Controller;
import csel.model.GameCommand;
import csel.view.GameViewport;

public class ShowChangeBindingsDialog implements GameCommand
{
	private final GameViewport gameViewport;
	private final Controller controller;
	
	public ShowChangeBindingsDialog(GameViewport gameViewport, Controller controller)
	{
		this.gameViewport = gameViewport;
		this.controller = controller;
	}

	public void execute()
	{
		gameViewport.accept( new ToggleChangeBindingsCommand() );
	}
	
	private class ToggleChangeBindingsCommand implements GameCommand
	{
		public void execute()
		{
			gameViewport.showControlDialog( controller );
		}
	}
}
